
// #ifdef H5
import * as echarts from 'echarts'
// #endif
// #ifdef MP-WEIXIN
const echarts = require('../../static/echarts.min')
// #endif

//折线图配置
export const lineOption = {
    legend: {
        show: true,
        data: [] as any[],
    },
    tooltip: {
        show: true,
        trigger: 'axis',
        confine: true,
        axisPointer: {
            type: 'line',
            snap: true
        },
        textStyle: {
            textShadowColor: "transparent",
            textShadowBlur: 5,
        }
    },
    grid: {
        left: '3%',
        right: '5%',
        top: '20%',
        bottom: '5%',
        containLabel: true
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        axisTick: {
            show: true,
            inside: true
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: '#707070'
            }
        },
        axisLabel: {
            textStyle: {
                color: "#A8ADCF"
            }
        }
    },
    yAxis: {
        minInterval: 1,// 设置最小间隔为1
        type: 'value',
        name: "",
        nameTextStyle: {
            color: "#A8ADCF"
        },
        axisTick: {
            show: false
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: '#707070'
            }
        },
        axisLabel: {
            textStyle: {
                color: "#A8ADCF"
            }
        },
        splitLine: {
            show: true,
            lineStyle: {
                type: 'dashed',
                color: 'rgba(112, 112, 112, 0.2)'
            }
        }
    },
    dataset: {
        source: [] as any[],
    },
    series: [
        {
            type: "line",
            smooth: true,
            symbol: 'none',
            lineStyle: {
                color: "#35ADFD",
                width: 1.5,
            },
            areaStyle: {
                show: true,
                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
                    {
                        offset: 0,
                        color: 'rgba(31, 215, 236, 0.1)'
                    },
                    {
                        offset: 0.5,
                        color: 'rgba(83, 169, 255, 0.1)'
                    },
                    {
                        offset: 1,
                        color: 'rgba(208, 222, 255, 0.1)'
                    }
                ])
            },
        }
    ],
    color: ['#83bff6']
}

